home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / complib / zgegs.z / zgegs
Text File  |  1998-10-30  |  7KB  |  199 lines

  1.  
  2.  
  3.  
  4. ZZZZGGGGEEEEGGGGSSSS((((3333FFFF))))                                                            ZZZZGGGGEEEEGGGGSSSS((((3333FFFF))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ZGEGS - compute for a pair of N-by-N complex nonsymmetric matrices A,
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      SUBROUTINE ZGEGS( JOBVSL, JOBVSR, N, A, LDA, B, LDB, ALPHA, BETA, VSL,
  13.                        LDVSL, VSR, LDVSR, WORK, LWORK, RWORK, INFO )
  14.  
  15.          CHARACTER     JOBVSL, JOBVSR
  16.  
  17.          INTEGER       INFO, LDA, LDB, LDVSL, LDVSR, LWORK, N
  18.  
  19.          DOUBLE        PRECISION RWORK( * )
  20.  
  21.          COMPLEX*16    A( LDA, * ), ALPHA( * ), B( LDB, * ), BETA( * ), VSL(
  22.                        LDVSL, * ), VSR( LDVSR, * ), WORK( * )
  23.  
  24. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  25.      DGEGS computes for a pair of N-by-N complex nonsymmetric matrices A, B:
  26.      the generalized eigenvalues (alpha, beta), the complex Schur form (A, B),
  27.      and optionally left and/or right Schur vectors (VSL and VSR).
  28.  
  29.      (If only the generalized eigenvalues are needed, use the driver ZGEGV
  30.      instead.)
  31.  
  32.      A generalized eigenvalue for a pair of matrices (A,B) is, roughly
  33.      speaking, a scalar w or a ratio  alpha/beta = w, such that  A - w*B is
  34.      singular.  It is usually represented as the pair (alpha,beta), as there
  35.      is a reasonable interpretation for beta=0, and even for both being zero.
  36.      A good beginning reference is the book, "Matrix Computations", by G.
  37.      Golub & C. van Loan (Johns Hopkins U. Press)
  38.  
  39.      The (generalized) Schur form of a pair of matrices is the result of
  40.      multiplying both matrices on the left by one unitary matrix and both on
  41.      the right by another unitary matrix, these two unitary matrices being
  42.      chosen so as to bring the pair of matrices into upper triangular form
  43.      with the diagonal elements of B being non-negative real numbers (this is
  44.      also called complex Schur form.)
  45.  
  46.      The left and right Schur vectors are the columns of VSL and VSR,
  47.      respectively, where VSL and VSR are the unitary matrices
  48.      which reduce A and B to Schur form:
  49.  
  50.      Schur form of (A,B) = ( (VSL)**H A (VSR), (VSL)**H B (VSR) )
  51.  
  52.  
  53. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  54.      JOBVSL   (input) CHARACTER*1
  55.               = 'N':  do not compute the left Schur vectors;
  56.               = 'V':  compute the left Schur vectors.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ZZZZGGGGEEEEGGGGSSSS((((3333FFFF))))                                                            ZZZZGGGGEEEEGGGGSSSS((((3333FFFF))))
  71.  
  72.  
  73.  
  74.      JOBVSR   (input) CHARACTER*1
  75.               = 'N':  do not compute the right Schur vectors;
  76.               = 'V':  compute the right Schur vectors.
  77.  
  78.      N       (input) INTEGER
  79.              The order of the matrices A, B, VSL, and VSR.  N >= 0.
  80.  
  81.      A       (input/output) COMPLEX*16 array, dimension (LDA, N)
  82.              On entry, the first of the pair of matrices whose generalized
  83.              eigenvalues and (optionally) Schur vectors are to be computed.
  84.              On exit, the generalized Schur form of A.
  85.  
  86.      LDA     (input) INTEGER
  87.              The leading dimension of A.  LDA >= max(1,N).
  88.  
  89.      B       (input/output) COMPLEX*16 array, dimension (LDB, N)
  90.              On entry, the second of the pair of matrices whose generalized
  91.              eigenvalues and (optionally) Schur vectors are to be computed.
  92.              On exit, the generalized Schur form of B.
  93.  
  94.      LDB     (input) INTEGER
  95.              The leading dimension of B.  LDB >= max(1,N).
  96.  
  97.      ALPHA   (output) COMPLEX*16 array, dimension (N)
  98.              BETA    (output) COMPLEX*16 array, dimension (N) On exit,
  99.              ALPHA(j)/BETA(j), j=1,...,N, will be the generalized eigenvalues.
  100.              ALPHA(j), j=1,...,N  and  BETA(j), j=1,...,N  are the diagonals
  101.              of the complex Schur form (A,B) output by ZGEGS.  The  BETA(j)
  102.              will be non-negative real.
  103.  
  104.              Note: the quotients ALPHA(j)/BETA(j) may easily over- or
  105.              underflow, and BETA(j) may even be zero.  Thus, the user should
  106.              avoid naively computing the ratio alpha/beta.  However, ALPHA
  107.              will be always less than and usually comparable with norm(A) in
  108.              magnitude, and BETA always less than and usually comparable with
  109.              norm(B).
  110.  
  111.      VSL     (output) COMPLEX*16 array, dimension (LDVSL,N)
  112.              If JOBVSL = 'V', VSL will contain the left Schur vectors.  (See
  113.              "Purpose", above.)  Not referenced if JOBVSL = 'N'.
  114.  
  115.      LDVSL   (input) INTEGER
  116.              The leading dimension of the matrix VSL. LDVSL >= 1, and if
  117.              JOBVSL = 'V', LDVSL >= N.
  118.  
  119.      VSR     (output) COMPLEX*16 array, dimension (LDVSR,N)
  120.              If JOBVSR = 'V', VSR will contain the right Schur vectors.  (See
  121.              "Purpose", above.)  Not referenced if JOBVSR = 'N'.
  122.  
  123.      LDVSR   (input) INTEGER
  124.              The leading dimension of the matrix VSR. LDVSR >= 1, and if
  125.              JOBVSR = 'V', LDVSR >= N.
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ZZZZGGGGEEEEGGGGSSSS((((3333FFFF))))                                                            ZZZZGGGGEEEEGGGGSSSS((((3333FFFF))))
  137.  
  138.  
  139.  
  140.      WORK    (workspace/output) COMPLEX*16 array, dimension (LWORK)
  141.              On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
  142.  
  143.      LWORK   (input) INTEGER
  144.              The dimension of the array WORK.  LWORK >= max(1,2*N).  For good
  145.              performance, LWORK must generally be larger.  To compute the
  146.              optimal value of LWORK, call ILAENV to get blocksizes (for
  147.              ZGEQRF, ZUNMQR, and CUNGQR.)  Then compute:  NB  -- MAX of the
  148.              blocksizes for ZGEQRF, ZUNMQR, and CUNGQR; the optimal LWORK is
  149.              N*(NB+1).
  150.  
  151.      RWORK   (workspace) DOUBLE PRECISION array, dimension (3*N)
  152.  
  153.      INFO    (output) INTEGER
  154.              = 0:  successful exit
  155.              < 0:  if INFO = -i, the i-th argument had an illegal value.
  156.              =1,...,N:  The QZ iteration failed.  (A,B) are not in Schur form,
  157.              but ALPHA(j) and BETA(j) should be correct for j=INFO+1,...,N.  >
  158.              N:  errors that usually indicate LAPACK problems:
  159.              =N+1: error return from ZGGBAL
  160.              =N+2: error return from ZGEQRF
  161.              =N+3: error return from ZUNMQR
  162.              =N+4: error return from ZUNGQR
  163.              =N+5: error return from ZGGHRD
  164.              =N+6: error return from ZHGEQZ (other than failed iteration)
  165.              =N+7: error return from ZGGBAK (computing VSL)
  166.              =N+8: error return from ZGGBAK (computing VSR)
  167.              =N+9: error return from ZLASCL (various places)
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.